<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head th:include="common/common :: jscss">
    <title>关联产品分类</title>
</head>
<body>

<div class="layui-fluid">

    <blockquote class="layui-crumb">
        后台产品>推广分类>
        <a lay-href="/extension/serv/category/group/list.action">分类关联</a> >
        <zmn th:text="${extensionServCategName}">推广服务分类名称</zmn> >
        <zmn th:text="${extensionCategName}">推广分类名称</zmn> >
        <zmn>推广分类关联后台分类</zmn>
    </blockquote>

    <div class="layui-card">

        <div class="layui-card-body">
            <form method="post" action="" class="layui-form" lay-filter="zmn-form">

                <div class="layui-card-header" style="margin-top:10px;"><b>关联后台分类</b></div>
                <div><p>关联后台分类，主要用来通过推广分类关联关系，进行推广数据统计</p></div>
                <div class="layui-split">&nbsp;</div>

                <zmn th:each="m : ${categOnes}">
                    <div class="layui-form-item" th:if="${map[m.categId] != null}">
<!--                        <label class="layui-form-label">[[${m.name}+'：']]</label>-->
<!--                        <div class="layui-input-block">-->
<!--                            <tr th:each="twoCategory : ${map[m.categId]}">-->
<!--                                <input type="checkbox" name="showPlat" th:value="${twoCategory.categOneId}+','+${twoCategory.categId}" th:title="${twoCategory.categoryName}" th:checked="${twoCategory.related}">-->
<!--                            </tr>-->
<!--                        </div>-->

                        <div class="zmn-2layer-list">
                            <div class="list-left" style="text-align: center">
                                <div class="list-item" th:text="${m.name}+'：'">
                                </div>
                            </div>
                            <div class="list-right">
                                <div class="right-box">
                                    <tr th:each="twoCategory : ${map[m.categId]}">
                                        <div class="list-item" th:title="${twoCategory.categoryName}">
                                            <input type="checkbox" name="showPlat" th:value="${twoCategory.categOneId}+','+${twoCategory.categId}" th:title="${twoCategory.categoryName}" th:checked="${twoCategory.related}">
                                        </div>
                                    </tr>
                                </div>
                            </div>
                        </div>

                    </div>
                </zmn>

                <!--按钮栏
                        置于form标签内的最下方，
                        主功能按钮使用默认样式，次要功能按钮使用原始按钮(加入样式layui-btn-primary)
                        -->
                <div class="layui-form-item submit">
                    <div class="layui-input-block" style="margin-left: 115px">
                        <button th:if="${#authPermit.checkPermit('/extension/serv/category/group/batchRelateBackCategory.action')}" class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">提交</button>
                        <button type="reset" class="layui-btn layui-btn-primary"
                                onclick="layui.admin.events.closeThisTabs();">取消
                        </button>
                    </div>
                </div>

                <div class="layui-split">&nbsp;</div>
            </form>
        </div>

    </div>

</div>

<script type="text/javascript" th:inline="javascript">
    var json = {
        groupId: [[${groupId}]],
        extensionServCategId: [[${extensionServCategId}]],
        extensionCategId: [[${extensionCategId}]],
    };
    layui.config({
        base: "/static/lay/"
    }).extend({
        index: "lib/index",
        extension_serv_category_group_relatebackcategory_js: "extension/serv/category/group/zmn.plat.extension.serv.category.group.relatebackcategory",
    }).use(['index', 'extension_serv_category_group_relatebackcategory_js']);

</script>
</body>
</html>